<template>
  <div>
    <!-- 轮播图 -->
    <mt-swipe :auto="4000">
      <!-- 组件中使用 v-for 必须绑定 key 属性 -->
      <mt-swipe-item v-for="list in galleryList" :key="list.url">
        <!-- 当你不给 src 前面加冒号的时候，那么 src 的值就是字符串 list.src ，当加上冒号的时候那么 src 的值就是对应的图片地址 -->
        <img :src="list.src" alt>
      </mt-swipe-item>
    </mt-swipe>

    <!-- 设置六宫格 -->
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon mui-icon-home"></span>
          <div class="mui-media-body">新闻资讯</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon mui-icon-email">
          </span>
          <div class="mui-media-body">图片分享</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon mui-icon-chatbubble"></span>
          <div class="mui-media-body">商品购买</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon mui-icon-location"></span>
          <div class="mui-media-body">留言反馈</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon mui-icon-search"></span>
          <div class="mui-media-body">视频专区</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span class="mui-icon mui-icon-phone"></span>
          <div class="mui-media-body">联系我们</div>
        </a>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      galleryList: [
        {
          src:
            "https://wpc.lenovo.com/DataCentre-insights/Resource/listImage/list_image_1542119823.png",
          url:
            "https://www.lenovo.com/jo/en/data-center/trends/article/?id=5beae191866d6"
        },
        {
          src:
            "https://wpc.lenovo.com/DataCentre-insights/Resource/listImage/list_image_1532434607.png",
          url:
            "https://www.lenovo.com/ae/en/data-center/trends/article/?id=5beae191866d6"
        },
        {
          src:
            "https://wpc.lenovo.com/DataCentre-insights/Resource/listImage/list_image_1534931356.jpg",
          url:
            "https://www.lenovo.com/lb/en/data-center/trends/article/?id=5b7d319d4c9b4"
        }
      ]
    };
  },
  created() {},
  methods: {}
};
</script>

<style lang="scss" scoped>
// 轮播图显示出来需要设置其高度, &:nth-child() 这是与 .mint-swipe-item 取交集，这是 scss 的一种样式写法
.mint-swipe {
  height: 200px;
  .mint-swipe-item {
    &:nth-child(1) {
      background-color: red;
    }
    &:nth-child(2) {
      background-color: blue;
    }
    &:nth-child(3) {
      background-color: green;
    }

    img {
      width: 100%;
      height: 100%;
    }
  }
}

.mui-grid-view.mui-grid-9 {
    background-color: #fff;
    border: none;

    .mui-table-view-cell {
        border: none;
    }
}
</style>
